<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script SRC="lib/vue.js"></script>
</head>
<body>
<div id="app">
    <counter></counter>
    <hr>
    <counter></counter>
    <hr>
    <counter></counter>
</div>
<template id="tem1">
    <div>
    <input type="button" value="+1" @click="incount">
    <h3>{{count}}</h3>
    </div>
</template>


<script>
    Vue.component("counter",{
      template:"#tem1",
      data:function () {
        return {count:0}
      },
      methods:{
        incount(){
          this.count++
        }
      }
    })
    var vm= new Vue({
      el:"#app",
      data:{},
      methods:{}
    })
</script>
</body>
</html>